# -*-coding:utf-8 -*-
# author: leemon
# datetime: 2021/1/7 上午10:47

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',  # 数据库引擎
        'NAME': 'spug',  # 数据库名
        'USER': 'root',  # 账号
        'PASSWORD': 'Admin@123',  # 密码
        'HOST': '127.0.0.1',  # HOST
        'POST': 3306,  # 端口

    }
}

CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": "redis://127.0.0.1:6379/1",
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
        }
    }
}

CHANNEL_LAYERS = {
    "default": {
        "BACKEND": "channels_redis.core.RedisChannelLayer",
        "CONFIG": {
            "hosts": [("127.0.0.1", 6379)],
            "capacity": 1000,
            "expiry": 120,
        },
    },
}
